added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / CSCpuUsage / TotalCpuUsageMonitor.cs
blob8e8fbd0ead41cc8dfbd37a2fa2318eb56a7e094c
1 /****************************** Module Header ******************************\
2 * Module Name: TotalCpuUsageMonitor.cs
3 * Project: CSCpuUsage
4 * Copyright (c) Microsoft Corporation.
5 *
6 * This class inherits CpuUsageMonitorBase and it is used to monitor the total
7 * CPU usage.
8 *
9 *
10 * This source is subject to the Microsoft Public License.
11 * See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
12 * All other rights reserved.
14 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
15 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
16 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
17 \***************************************************************************/
19 using System;
20 using System.Collections.Generic;
21 using System.Linq;
22 using System.Text;
23 using System.Diagnostics;
25 namespace CSCpuUsage
27 public class TotalCpuUsageMonitor : CpuUsageMonitorBase
29 const string categoryName = "Processor";
30 const string counterName = "% Processor Time";
31 const string instanceName = "_Total";
33 public TotalCpuUsageMonitor(int timerPeriod, int valueArrayCapacity)
34 : base(timerPeriod, valueArrayCapacity, categoryName, counterName, instanceName)
35 { }